<?
ini_set("display_errors", 0);
$debug=1;

include("include/config.inc");
include("include/conn_db.inc");
include("include/parcer.inc");
include("include/check_time.inc");
include("include/secuire.inc");
/*
if($_POST["enter"]=="login"){
    check_access();
}
if(!isset($PHP_AUTH_USER)){
    echo xparse("tpl/login.html");
    return;
}
*/
$time="";
if($debug==1)start_time();

$logo_div=xparse("tpl/logo_div.html");
$top1="120";
$top2="141";
$top3="160";
$sql="SELECT * FROM all_conf WHERE var_name='show_logo'";
$result=mysql_fetch_array(mysql_query($sql, $conn_db));

if($result["var_val"]=="no"){
    $logo_div="";
    $top1="5";
    $top2="26";
    $top3="45";
}

if(isset($_POST["cases"])){
    switch($_POST["cases"]){
	case "console":
	    $table="<script>wopen('ssh/index.html');</script>";
	    break;
	case "all":
	case "cdr":
	case "option":
	case "vmail":
	case "radius":
	case "rtp":
	case "sip":
	case "oks":
	case "mgcp":
	case "skinny":
	case "ooh323":
	case "e1p":
	    include("include/case/mass.php");
	    break;
	case "e1":
	    include("include/case/e1.php");
	    break;
	case "modules":
	    include("include/case/modules.php");
	    break;
	case "system":
	    include("include/case/system.php");
	    break;
	case "pri_":
	    include("include/case/pri_.php");
	    break;
	default:
	    $table=xparse("html/tables/default.html");
	    break;
    }
}
else{
    include("include/case/system.php");
}

if($debug==1)$time="Page generated = ".end_time()."sec.";
echo xparse("tpl/index.html");
?>